home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / lorri4.zip / TELLER.SCR < prev    next >
Text File  |  1995-09-24  |  2KB  |  62 lines

  1. !
  2. ! Default Fortune Teller script..
  3. !
  4. ! (c) DC Software, 1989-1995
  5. !
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20.   loadtext( npc.text ); ! Get the NPC's text block !
  21.   loadvfl( npc.voice ); ! Get the NPC's voice block !
  22. ! First, say hello.. !
  23.   if NPC.V0 > 0 then
  24.     writeln( "Hello ", player.name, ". What brings you back?" );
  25.   else
  26.     writeln( "How may I help you?" );
  27.   endif;
  28.  
  29. ! Now, set some variables..
  30.   NPC.V0 = 1; ! From know on, remember we've been here
  31.  
  32.   L1 = select$( "Tell Fortune", npc.value, "Leave", -1 );
  33.  
  34.   if L1 <> 0 then
  35.     if NPC.V0 > 0 then
  36.       writeln( "As you wish.." );
  37.     else
  38.       writeln( "Fine, but you may live to regret it.." );
  39.     endif;
  40.     goto XSTOP;
  41.   endif;
  42.  
  43.   if npc.value > group.gold then
  44.     writeln( "You don't have enough money.." );
  45.     goto XSTOP;
  46.   endif;
  47.  
  48.   dec( group.gold, npc.value );
  49.   readtext( npc.text );
  50.   goto XSTOP;
  51.  
  52. !-----------------------------------------------------------------!
  53. ! All STOPs now lead here so the screen can be restored if needed !
  54. !-----------------------------------------------------------------!
  55. :XSTOP
  56.   if npc.picture >= 0 then
  57.     paint(window); ! Assumes the picture fits in the window !
  58.   endif;
  59.   stats(-1); ! Restore Stats area !
  60.   STOP;
  61.  
  62.